﻿var _oadomain = '';
function this_openoa() {
    GetOADomain();
    var _width = screen.availWidth - 12;
    var _height = screen.availHeight - 30;
    var _fs = "titlebar=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,hotkeys=no,dependent=no,resizable=yes,left=0,top=0"
							+ ",width=" + _width + ",height=" + _height;
    window.open(_oadomain + "/main/Main.aspx", "_blank", _fs);
}

//打开投票
function this_openvote() {
    GetOADomain();
    var _width = screen.availWidth - 12;
    var _height = screen.availHeight - 30;
    var _fs = "titlebar=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,hotkeys=no,dependent=no,resizable=yes,left=0,top=0"
							+ ",width=" + _width + ",height=" + _height;
    window.open(_oadomain + "/vote/vote_view.aspx?mode=recieve", "_blank", _fs);
}

//打开流程
function this_openFlow(flowid, id) {
    GetOADomain();
    var url = '';
    var fs = 'left=0,top=0,titlebar=no,toolbar=no,status=no,location=no,directories=no,menubar=no,scrollbars=yes,resizable=yes,width=800,height=600,dependent=yes';
    var url = _oadomain + '/flow/fl_ui_main.aspx?flow_id=' + flowid + '&ID=' + id + '&mode=edit&IsSubFlow=0&key=sso';
    window.open(url, '_blank', fs);
}
function this_QueryFlow() {
    GetOADomain();
    var url = '';
    var fs = 'left=0,top=0,titlebar=no,toolbar=no,status=no,location=no,directories=no,menubar=no,scrollbars=yes,resizable=yes,width=800,height=600,dependent=yes';
    var url = _oadomain + '/flow/fl_ui_main.aspx?flow_id=' + flowid + '&ID=' + id + '&mode=edit&IsSubFlow=0&key=sso';
    window.open(url, '_blank', fs);
}
//打开通知公告
function this_opennotice(pID) {
    GetOADomain();
    var url = '';
    var fs = 'left=0,top=0,titlebar=no,toolbar=no,status=no,location=no,directories=no,menubar=no,scrollbars=yes,resizable=yes,width=800,height=600,dependent=yes';
    url = _oadomain + '/notice/ftfy_notice_board.aspx?id=' + pID + '&class=';
    window.open(url, '_blank', fs);
}

//打开排头兵
function this_openptb(pID) {
    GetOADomain();
    var url = '';
    var fs = 'left=0,top=0,titlebar=no,toolbar=no,status=no,location=no,directories=no,menubar=no,scrollbars=yes,resizable=yes,width=800,height=600,dependent=yes';
    url = _oadomain + '/lgfy/lgfy_ptb_info_view.aspx?id=' + pID + '&class=';
    window.open(url, '_blank', fs);
}

//打开公文传阅
function this_openSender(flowid) {
    GetOADomain();
    var url = '';
    var fs = 'left=0,top=0,titlebar=no,toolbar=no,status=no,location=no,directories=no,menubar=no,scrollbars=yes,resizable=yes,width=800,height=600,dependent=yes';
    var url = _oadomain + '/flow/fl_ui_sender_view.aspx?id=' + flowid;
    window.open(url, '_blank', fs);
}
//打开事务申请
function this_newflow(pID) {
    GetOADomain();
    var url = '';
    var fs = 'left=0,top=0,titlebar=no,toolbar=no,status=no,location=no,directories=no,menubar=no,scrollbars=yes,resizable=yes,width=800,height=600,dependent=yes';
    url = _oadomain + '/flow/fl_ui_main.aspx?flow_id=' + pID + '&ID=0&mode=add&IsSubFlow=0&key=sso';
    window.open(url, '_blank', fs);
}

//打开信息报送
function this_opendeptinfo(infoid) {
    GetOADomain();
    var fs = 'left=0,top=0,titlebar=no,toolbar=no,status=no,location=no,directories=no,menubar=no,scrollbars=yes,resizable=yes,width=800,height=600,dependent=yes';
    var url = _oadomain + '/lgfy/lgfy_dept_info_view.aspx?id=' + infoid + '&type=desk';
    window.open(url, '_blank', fs);
}

//打开留言
function this_openMessage(pID) {
    GetOADomain();
    var url = '';
    var fs = 'left=0,top=0,titlebar=no,toolbar=no,status=no,location=no,directories=no,menubar=no,scrollbars=yes,resizable=yes,width=800,height=600,dependent=yes';
    url = _oadomain + '/message/fi_message_view.aspx?id=' + pID;
    window.open(url, '_blank', fs);
}

//打开报表
function this_openrpt(pID) {
    GetOADomain();
    var url = '';
    var fs = 'left=0,top=0,titlebar=no,toolbar=no,status=no,location=no,directories=no,menubar=no,scrollbars=yes,resizable=yes,width=800,height=600,dependent=yes';
    url = _oadomain + '/rpt/rpt_listreport_runprms.aspx?id=' + pID + '';
    window.open(url, '_blank', fs);
}
//博客详细页
function onblogDetail(id, uid) {
    var url="/BBS/home.php?mod=space&uid=" + uid + "&do=blog&id=" + id;
    window.open(url, '_blank', '');
}

//论坛详细页
function onforumdetail(id, pid) {
    var url = "/BBS/forum.php?mod=viewthread&tid=" + id;
    window.open(url, '_blank', '');
}

function GetOADomain() {
    _oadomain="/" + document.all.hdOADomain.value;
    if (_oadomain == '')
        _oadomain = '/lgfyoa';
}